#include <QCoreApplication>
#include <QTcpSocket>
#include <QDataStream>
#include <QtDebug>

int main(int argc, char *argv[])
{
	QCoreApplication app(argc, argv);

	QTcpSocket ts;
	ts.connectToHost("127.0.0.1", 2802);

	ts.waitForConnected();

	QDataStream ds(&ts);
	quint8 m = 1;
	quint32 c = sizeof(m);

	ds << c << m;

	ts.waitForReadyRead();

	qDebug() << ts.readAll();

	ts.close();

	return app.exec();
}
